package day02;
//char类型的演示
public class CharDemo {
    public static void main(String[] args) {
        //5）字符型，占2个字节
        char c1 = '女';          //字符 女
        char c2 = 'f';           //字符 f
        char c3 = '6';           //字符 6
        System.out.println(c3);
        char c4 = ' ';           //空格符
        //char c5 = 女;          //编译错误，字符型直接量必须放在单引号中
        //char c6 = '';          //编译错误，必须要有字符
        //char c7 = '10';        //编译错误，只能存储一个字符

        char c8 = 65;            //0到65535之间
        System.out.println(c8);  //println()会依据变量的类型做输出展示
                                 //c8为char型，所以会以字符的形式输出-----------A

        char c9 = '\\';
        System.out.println(c9);  //字符 \

        char c10 = 65535;            //0到65535之间
        System.out.println(c10+10);  //65545

        char c11 = 22221;            //0到65535之间
        System.out.println(c11);  //囍

        char c12 = 20061;            //0到65535之间
        System.out.println(c12);  //九
    }
}
